home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-02-12 | 27.6 KB | 1,065 lines |
- Frequently Asked Questions (FAQS);faqs.384
-
-
- }
-
- /* User Pressed the "Stop" button in dialog. */
- void
- stop(dialog)
- Widget dialog;
- {
- stopped = True;
- }
-
- Boolean
- CheckForInterrupt()
- {
- extern Widget shell;
- Display *dpy = XtDisplay(shell);
- Window win = XtWindow(dialog);
- XEvent event;
-
- /* Make sure all our requests get to the server */
- XFlush(dpy);
-
- /* Let motif process all pending exposure events for us. */
- XmUpdateDisplay(shell);
-
- /* Check the event loop for events in the dialog ("Stop"?) */
- while (XCheckMaskEvent(dpy,
- ButtonPressMask | ButtonReleaseMask | ButtonMotionMask |
- PointerMotionMask | KeyPressMask | KeyReleaseMask,
- &event)) {
- /* got an "interesting" event. */
- if (event.xany.window == win)
- XtDispatchEvent(&event); /* it's in our dialog.. */
- else /* uninteresting event--throw it away and sound bell */
- XBell(dpy, 50);
- }
- return stopped;
- }
-
-
- -----------------------------------------------------------------------------
- Subject: 140) What order should the libraries be linked in?
- [Last modified: August 92]
-
- Answer: At link time, use the library order -lXm -lXt -lX11. There are two
- reasons for this (dbrooks@osf.org):
-
- On most systems, the order matters because the linker won't re-scan a library
- once it is done with it. Thus any references to Xlib calls from Xm will
- probably be unresolved.
-
- The [other] problem is that there are two VendorShell widgets. A dummy is
- provided in the Xt library, but a widget set will rely on its own being
- referenced. If you mention Xt first, the linker will choose the wrong one.
-
- Motif code will wrongly assume the Motif VendorShell has been class-
- initialized [and will probably crash].
- Xaw has a similar problem, but a softer landing; it only complains about
- unregistered converters.
-
-
- -----------------------------------------------------------------------------
- Subject: 141) How do I use xmkmf for Motif clients?
-
- [Last modified: October 1992]
-
- Answer: This advice comes from dbrooks@osf.org:
-
- There are a number of intractable problems with using X configuration files
- and xmkmf, while trying to make it easy to build Motif. Not the least of
- these, but one I've never heard mentioned yet, is that the rules for
- contructing the names of shared library macros are machine-dependent, and in
- the various xxxLib.tmpl files. Do we edit all those files to add definitions
- for XMLIB, DEPXMLIB, etc., or do we put a maze of #ifdefs into the Motif.tmpl
- file?
-
- Please note that, if you install Motif, it overwrites your installed
- Imake.tmpl with one that includes Motif.tmpl and Motif.rules.
-
- With those caveats, I think the following guidelines will help.
-
- David Brooks OSF
-
- Clients in the X11R5 release use the xmkmf command to build Makefiles. In
- general, the xmkmf command cannot be used for Motif clients, because of the
- need to consider the UseInstalledMotif flag separately. Since xmkmf is a
- simple script that calls imake, it is easy to construct the proper call to
- imake using the following rules.
-
- In the following, replace {MTOP} by the toplevel directory with the Motif
- source tree, and {XTOP} by the toplevel ("mit") directory with the X source.
- It is assumed that the directory containing your installed imake is in your
- PATH.
-
- When needed, the imake variables XTop and MTop are normally set in your
- site.def (to {XTOP} amd {MTOP} respectively); however they may also be set
- with additional -D arguments to imake.
-
- 1. With both X and Motif in their source trees, ensure the imake variables
- XTop and MTop are set, and use:
-
- ${XTOP}/config/imake -I{MTOP}/config
-
- 2. With Motif in its source tree, and X installed, ensure MTop is set, and
- use:
-
- imake -I{MTOP}/config -DUseInstalled
-
- 3. With both Motif and X installed, and a nonstandard ProjectRoot (see
- site.def for an explanation of this), use:
-
- imake -DUseInstalled -DUseInstalledMotif -I{ProjectRoot}/lib/X11/config
-
- or, if the configuration files are in /usr/lib/X11/config:
-
- imake -DUseInstalled -DUseInstalledMotif
-
-
- To build a simple Imakefile, remember to include lines like this:
-
- LOCAL_LIBRARIES = XmClientLibs
- DEPLIBS = XmClientDepLibs
-
- Or, for a client that uses uil/mrm, replace these by MrmClientLibs and
- MrmClientDepLibs, and also use:
-
- MSimpleUilTarget(program)
-
- to build the client and uid file. Look at the demos for more examples.
-
-
- And Paul Howell <grue@engin.umich.edu> added:
-
- i did this, calling the new script "xmmkmf". It passes both -DUseInstalled
- and -DUseInstalledMotif.
-
- and i modified the stock R5 Imake.tmpl to do this:
-
- #include <Project.tmpl>
- #ifdef UseInstalledMotif
- #include <Motif.tmpl>
- #endif
-
- #include <Imake.rules>
- #ifdef UseInstalledMotif
- #include <Motif.rules>
- #endif
-
- the result was something that does both athena and motif rules. and it really
- works, just that easy!
-
-
- -----------------------------------------------------------------------------
- Subject: 142) How do I make context sensitive help? The Motif Style Guide
- says that an application must initiate context-sensitive help by changing the
- shape of the pointer to the question pointer. When the user moves the pointer
- to the component help is wanted on and presses BSelect, any available context
- sensitive help for the component must be presented, and the pointer reverts
- from the question pointer.
- [Last modified: August 92]
-
- Answer: A widget that gives context sensitive help would place this help in
- the XmNhelpCallback function. To trigger this function: (from Martin G C
- Davies, mgcd@se.alcbel.be)
-
- I use the following callback that is called when the "On Context" help
- pulldown menu is selected. It does the arrow bit and calls the help callbacks
- for the widget. It also zips up the widget tree looking for help if needs be.
- I don't restrict the arrows motion so I can get help on dialog boxes. No
- prizes for guessing what "popup_message" does.
-
-
- static void ContextHelp(
- Widget w ,
- Opaque * tag ,
- XmAnyCallbackStruct * callback_struct
- )
- {
- static Cursor context_cursor = NULL ;
- Widget context_widget ;
-
- if ( context_cursor == NULL )
- context_cursor = XCreateFontCursor( display, XC_question_arrow ) ;
-
- context_widget = XmTrackingLocate( top_level_widget,
- context_cursor, FALSE ) ;
-
- if ( context_widget != NULL ) /* otherwise its not a widget */
- {
- XmAnyCallbackStruct cb ;
-
- cb.reason = XmCR_HELP ;
- cb.event = callback_struct->event ;
-
- /*
- * If there's no help at this widget we'll track back
- up the hierarchy trying to find some.
- */
-
- do
- {
- if ( ( XtHasCallbacks( context_widget, XmNhelpCallback ) ==
- XtCallbackHasSome ) )
- {
- XtCallCallbacks( context_widget, XmNhelpCallback, & cb ) ;
- return ;
- }
- else
- context_widget = XtParent( context_widget ) ;
- } while ( context_widget != NULL ) ;
- }
-
- popup_message( "No context-sensitive help found\n\
- for the selected object." ) ;
- }
-
-
-
- Dave Bonnett suggested, to use the following translations for XmText (and
- XmTextField) widgets to get the same help with key strokes, and to provide an
- accelerator label in the Context help menu entry.
-
- MyApp*XmText*translations: #override\n\
- <Key>F1: Help()
-
- MyApp*Help_menu*Contextual Help.acceleratorText: F1
-
- MyApp*defaultVirtualBindings: osfBackSpace : <Key>Delete\n\
- osfRight : <Key>Right\n\
- osfLeft : <Key>Left\n\
- osfUp : <Key>Up\n\
- osfHelp : <Key>F1\n\
- osfDown : <Key>Down
-
- -----------------------------------------------------------------------------
- Subject: 143) TOPIC: ACKNOWLEDGEMENTS
-
- This list was compiled using questions and answers posed to
- comp.windows.x.motif and motif-talk. Some extracts were also taken from FAQs
- of comp.windows.x. To all who contributed one way or the other, thanks! I
- haven't often given individual references, but you may recognise
- contributions. If I have mangled them too much, let me know.
-
-
-
- That's all folks!
-
-
- +----------------------+---+
- Jan Newmarch, Information Science and Engineering,
- University of Canberra, PO Box 1, Belconnen, Act 2616
- Australia. Tel: (Aust) 6-2522422. Fax: (Aust) 6-2522999
-
- ACSnet: jan@ise.canberra.edu.au
- ARPA: jan%ise.canberra.edu.au@uunet.uu.net
- UUCP: {uunet,ukc}!munnari!ise.canberra.edu.au!jan
- JANET: jan%au.edu.canberra.ise@EAN-RELAY
-
- +--------------------------+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Local Variables:
- mode: outline
- outline-regexp: "Subject: +[0-9]+)"
- eval: (hide-body)
- End:
- --
- +----------------------+---+
- Jan Newmarch, Information Science and Engineering,
- University of Canberra, PO Box 1, Belconnen, Act 2616
- Australia. Tel: (Aust) 6-2012422. Fax: (Aust) 6-2015041
- Xref: bloom-picayune.mit.edu comp.os.msdos.programmer:18887 news.answers:4710
- Path: bloom-picayune.mit.edu!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!mcsun!uknet!doc.ic.ac.uk!agate!ames!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ncoast!brown
- From: brown@NCoast.ORG (Stan Brown)
- Newsgroups: comp.os.msdos.programmer,news.answers
- Subject: comp.os.msdos.programmer FAQ diffs
- Message-ID: <msdos-faq-diff.921220@NCoast.ORG>
- Date: 20 Dec 92 20:04:33 GMT
- Expires: Thu, 14 Jan 1993 20:04:33 GMT
- References: none
- Followup-To: comp.os.msdos.programmer
- Organization: Oak Road Systems, Cleveland Ohio USA
- Lines: 269
- Approved: news-answers-request@MIT.Edu
-
- Archive-name: msdos-programmer-faq/diff1
- Last-modified: 20 December 1992
-
-
- As the FAQ list is quite long, I'm posting diffs for those of you who
- already have copies of last month's edition (dated 15 November). If you
- want the complete list, don't worry: I'm posting it at about the same
- time but as a separate thread: look for "comp.os.msdos.programmer FAQ
- part" in the Subject line.
-
- As usual, I've omitted trivial diffs, those involving only formatting
- and punctuation, and those that show renumbered Qs with no text change.
-
- Key: "-" lines were in last month's FAQ list; "+" lines are in this
- month's. Line numbers are approximate only.
-
- - 67> 207. What's the difference between .COM and .EXE formats?
- + 67> 207. What's the format of an .OBJ file?
- + 68> 208. What's the format of an .EXE header?
- + 69> 209. What's the difference between .COM and .EXE formats?
-
- - 91> 407. What's the format of an .EXE header?
- - 92> 408. What's the format of an .OBJ file?
- + 96> 410. What's the format of .OBJ, .EXE., .COM files?
-
- + 176>New contributors this month: Paul Ducklin, Mike Iarrobino, Duncan
- + 177>Murdoch, Anders Thulin, Curt Tilmes, rujo@extern.uio.no
-
- - 260> Readership report for Oct 92" in news.lists shows 40,000 readers of
- - 261> this newsgroup worldwide.
- + 265> Readership report for Nov 92" in news.lists shows 42,000 readers of
- + 266> this newsgroup worldwide. Traffic was 1090.7 Kbytes (exclusive of
- + 267> crossposts), comprised in 611 articles.
-
- - 314> notices here.
- + 320> notices to comp.os.msdos.programmer.
-
- - 327> - comp.binaries.ibm.pc.archives used to explain how to use the
- - 328> archive sites, especially garbo and Simtel; but the archive
- - 329> managers have stopped posting notices of uploads. There is a vote
- - 330> (through 7 December 1992) on creating a moderated group,
- - 331> comp.archives.msdos.announce, to replace it. In the meantime, you
- - 332> can subscribe to upload announcements by sending mail containing
- - 333> the text line "subscribe msdos-ann" and no signature to
- - 334> listserv@tacom-emh1.army.mil.
- + 333> - comp.binaries.msdos.announce (moderated) explains how to use the
- + 334> archive sites, especially garbo and Simtel, and lists files
- + 335> uploaded to them. Discussions belong in comp.binaries.msdos.d,
- + 336> which replaced comp.binaries.ibm.pc.archives.
-
- + 351> - Turbo Vision is a mailing list, not a newsgroup; send email to
- + 352> listserv@vtvm1.cc.vt.edu if you want to subscribe.
-
- + 522>Q207. What's the format of an .OBJ file?
- + 524> Here's what I've been told, though I have verified any of these
- + 525> references myself:
- + 527> - base .OBJ format: Intel's document number #121748-001, {8086
- + 528> Relocatable Object Module Formats}. (Note however that both
- + 529> Microsoft and Borland formats have extended the .OBJ format.)
- + 531> - Microsoft-specific .OBJ formats: a "Microsoft OMF Specification"
- + 532> (document number ??), as well as a section in the MS-DOS
- + 533> encyclopedia.
- + 535> - A "tutorial on the .OBJ format" comes with the VAL experimental
- + 536> linker, which is VAL-LINK.ARC in PD1:<MSDOS.PGMUTL> at Simtel.
- + 538> If you have specific references, either to fpt-able documents or to
- + 539> published works (author, title, order number or ISBN), please email
- + 540> them to brown@ncoast.org for inclusion in the next edition of this
- + 541> list.
- + 543>Q208. What's the format of an .EXE header?
- + 545> See pages 349-350 of {PC Magazine}'s June 30, 1992 issue (xi:12) for
- + 546> the old and new formats. For a more detailed layout, look under INT
- + 547> 21 function 4B in Ralf Brown's interrupt list. Ralf Brown's list
- + 548> includes extensions for Borland's TLINK and Borland debugger info.
-
- - 528> ISBN 1-55615-329-5. Ralf Brown's interrupt list also documents the
- - 529> .EXE header (including extensions by Borland's TLINK) at INT 21
- - 530> function 4B, including New Executable and Linear Executable formats.
- + 553> ISBN 1-55615-329-5.
-
- - 517>Q207. What's the difference between .COM and .EXE formats?
- - 519> To oversimplify: a .COM file is a direct image of core, and an .EXE
- - 520> file will undergo some further relocation when it is run (and so it
- - 521> begins with a relocation header). A .COM file is limited to 64K for
- - 522> all segments combined, but an .EXE file can have as many segments as
- - 523> your linker will handle and be as large as RAM can take.
- + 555>Q209. What's the difference between .COM and .EXE formats?
- + 557> To oversimplify: a .COM file is a direct image of core, and an .EXE
- + 558> file will undergo some further relocation when it is run (and so it
- + 559> begins with a relocation header). A .COM file is limited to 64K for
- + 560> all segments combined, but an .EXE file can have as many segments as
- + 561> your linker will handle and be as large as RAM can take.
- + 563> The actual file extension doesn't matter. DOS knows that a file
- + 564> being loaded is in .EXE format if its first two bytes are MZ or ZM;
- + 565> otherwise it is assumed to be in .COM format. For instance, I am
- + 566> told that DR-DOS 6.0's COMMAND.COM is in .EXE format.
-
- - 915>Q407. What's the format of an .EXE header?
- - 917> See pages 349-350 of {PC Magazine}'s June 30, 1992 issue (xi:12) for
- - 918> the old and new formats. For a more detailed layout, look under INT
- - 919> 21 function 4B in Ralf Brown's interrupt list.
- - 921>Q408. What's the format of an .OBJ file?
- - 923> I have seen a reference to Intel's document number #121748-001,
- - 924> {8086 Relocatable Object Module Formats}, which covers the Intel
- - 925> .OBJ format. However, both Microsoft and Borland formats differ
- - 926> from the base Intel format. If you have specific references, either
- - 927> to fpt-able documents or to published works (author, title, order
- - 928> number or ISBN), please email them to brown@ncoast.org for inclusion
- - 929> in the next edition of this list.
-
- - 957>Q410. How can I read, create, change, or delete the volume label?
- - 959> You can't do it using the more modern DOS functions (3C, 41, 43),
- - 960> but the older FCB-oriented directory functions will do the job.
- - 961> Specifically, you need to allocate a 64-byte buffer and a 41-byte
- - 962> extended FCB (file control block). Call INT 21 AH=1A to find out
- - 963> whether there is a volume label. If there is, AL will return 0 and
- - 964> you can change the label using DOS function 17 or delete it using
- - 965> DOS function 13. If there is no volume label, function 1A will
- - 966> return FF and you can create a label by using function 16.
- - 968> The following MSC 7.0 code worked for me, where the parameter is 0
- + 977>Q408. How can I read, create, change, or delete the volume label?
- + 979> In DOS 5.0 (and, I believe, in 4.0 as well), there are actually two
- + 980> volume labels: one, the traditional one, is an entry in the root
- + 981> directory of the disk; and the other is in the boot record along
- + 982> with the serial number (see next Q). The DIR and VOL commands
- + 983> report the traditional label; the LABEL command reports the
- + 984> traditional one but changes both of them.
- + 986> In DOS 4.0 and later, use INT 21 function 69 to access the boot
- + 987> record's serial number and volume label together; see the next Q.
- + 989> Assume that by "volume label" you mean the traditional one, the one
- + 990> that DIR and VOL display. Though it's a directory entry in the root
- + 991> directory, you can't change it using the newer DOS file-access
- + 992> functions (3C, 41, 43); instead, use the old FCB-oriented directory
- + 993> functions. Specifically, you need to allocate a 64-byte buffer and
- + 994> a 41- byte extended FCB (file control block). Call INT 21 AH=1A to
- + 995> find out whether there is a volume label. If there is, AL returns 0
- + 996> and you can change the label using DOS function 17 or delete it
- + 997> using DOS function 13. If there's no volume label, function 1A will
- + 998> return FF and you can create a label via function 16. Important
- + 999> points to notice are that ? wildcards are allowed but * are not; the
- +1000> volume label must be space filled not null terminated.
- +1002> The following MSC 7.0 code worked for me in DOS 5.0; the functions
- +1003> it uses have been around since DOS 2.0. The function parameter is 0
-
- - 971> root directory for volume labels. This code should work for DOS
- - 972> 2.0+, though I tested it only under DOS 5.0. (I don't know what
- - 973> happens with networked drives.)
- - 975> Important points to notice are that ? wildcards are allowed but *
- - 976> are not; the volume label must be space filled not null-terminated.
- +1006> root directory for volume labels. (I didn't try to change the
- +1007> volume label of any networked drives.)
- +1009> // Requires DOS.H, STDIO.H, STRING.H
-
- -1023>Q411. How can I get the disk serial number?
- +1055>Q409. How can I get the disk serial number?
-
- +1061> This function also gets and sets the volume label, but it's the
- +1062> volume label in the boot record, not the volume label that a DIR
- +1063> command displays. See the preceding Q.
- +1065>Q410. What's the format of .OBJ, .EXE., .COM files?
- +1067> Please see section 2, "Compile and link".
-
- -1256> I'm outside my expertise on this one, but in November 1992 Jamshid
- -1257> Afshar (jamshid@emx.utexas.edu) kindly supplied the following:
- +1296> I'm outside my expertise on this one, but in late 1992 Jamshid
- +1297> Afshar (jamshid@emx.utexas.edu) kindly supplied the following, which
- +1298> incorporates some corrections agreed with Duncan Murdoch (dmurdoch@
- +1299> mast.queensu.ca). If you have any corrections or comments, please
- +1300> send them to both the above addresses.
-
- -1260> 1. Use XMS memory (don't bother with EMS). There are some libraries
- -1261> available at Simtel to access XMS. The disadvantage is that you
- +1303> 1. Use XMS or EMS memory. XMS is preferable in most cases, but
- +1304> some machines won't provide it. There are some libraries available
- +1305> at Simtel to access XMS or EMS. The disadvantage is that you
-
- -1268> program will run on even 286s.
- -1270> 2. Program under MS Windows. MS Windows functions as a DOS extender
- -1271> (see #3). Borland/Turbo C++ 3.0 includes EasyWin [and Microsoft
- -1272> C/C++ 7.0 has QuickWin --ed.] which is a library that automatically
- -1273> lets you compile your current code using C/C++ standard input or
- -1274> <conio.h>'s gotoxy() into a MS Windows program so your code can
- -1275> immediately allocate many MBs of memory (Windows enhanced mode even
- -1276> does virtual memory). The disadvantage of MS Windows is that any
- -1277> one object (e.g., a single malloc( )) is still restricted to 64K
- -1278> (unless you want to mess with huge pointers in Windows).
- -1280> 3. Use a DOS extender. This is definitely the best solution from
- -1281> the programmer's standpoint. You just allocate as much memory as
- -1282> you need using malloc( ) or `new' and you don't have to worry about
- -1283> any 64K limits. It doesn't require source code changes and unlike
- -1284> option #1 your code is portable and not obsolete in a few months.
- -1285> Your options for this solution are:
- -1287> - Buy PharLap's DOS extender (286 or 386 version) that works with
- -1288> BC++ 3.0+ (just requires a relink). Note, the BC++ 3.1 upgrade
- -1289> came with PharLap "lite".
- -1291> - Get the GNU (free,copylefted) gcc 2.1 compiler/extender that was
- -1292> ported to MS-DOS and runs on 386 machines (supports C and C++).
- -1293> FTP to barnacle.erc.clarkson.edu and get pub/msdos/djgpp/readme.
- -1295> - Wait for Borland's DOS extender package (in BC++ 4.0) that is
- -1296> supposed to be released at the end of this year. I believe MS is
- -1297> also doing the same. Zortech 3.0 comes with a DOS extender, but I
- -1298> wouldn't recommend the product.
- -1300> 4. This option doesn't really count since it's not a solution in
- +1312> program will easily run on even 286s.
- +1314> 2. Program under MS Windows. MS Windows functions as a 16-bit DOS
- +1315> Extender (see #3). Borland/Turbo C++ 3.x includes EasyWin [and
- +1316> Microsoft C/C++ 7.0 has QuickWin --ed.] which is a library that
- +1317> automatically lets you compile your current code using C/C++
- +1318> standard input or <conio.h> into a MS Windows program so your code
- +1319> can immediately allocate many MBs of memory (Windows enhanced mode
- +1320> even does virtual memory). The disadvantage is that like any 16-bit
- +1321> Extender a single malloc() is restricted to 64K (unless you want to
- +1322> mess with huge pointers in Windows). Also, EasyWin's screen output
- +1323> is significantly slower than a DOS character-mode program's and you
- +1324> must of course run the program from Windows.
- +1326> 3. Use a 16-bit or 32-bit DOS Extender. This is definitely the
- +1327> best solution from the programmer's standpoint. You just allocate
- +1328> as much memory as you need using malloc() or 'new'. A 16-bit
- +1329> Extender still has 16-bit ints and restricts arrays to 64K, but a
- +1330> 32-bit Extender has 32-bits ints (which makes porting a lot of UNIX
- +1331> code easier) so there are no 64K limits. A 32-bit Extender requires
- +1332> a 32-bit compiler and the program will not run on 286s. Some
- +1333> Extenders also do virtual memory. Using an Extender doesn't require
- +1334> source code changes and unlike option #1 your code is portable and
- +1335> not obsolete in a few months. Your options for this solution are:
- +1337> - Buy PharLap's 16-bit Extender that works with BC++ 3.0+ and MSC
- +1338> (just requires a relink). Note, the BC++ 3.1 upgrade came with
- +1339> PharLap "lite". Pharlap's 32-bit Extender works with 32-bit
- +1340> compilers like [?]
- +1342> - Get the GNU (free,copylefted) gcc 2.x compiler which DJ Delorie
- +1343> ported from UNIX and which uses his 32-bit Extender. It supports
- +1344> C and C++, but the Extender is VCPI which means neither the
- +1345> compiler nor programs it produces will run in a DOS session under
- +1346> Windows. FTP to barnacle.erc.clarkson.edu and get
- +1347> pub/msdos/djgpp/readme.
- +1349> - Get a 32-bit compiler or one that comes with a DOS Extender.
- +1350> Zortech comes with 16-bit and a 32-bit Extenders (no debugger for
- +1351> 32-bit programs, but Flashtek sells one). Watcom also makes a C
- +1352> [and C++?] 32-bit compiler. [If anyone else has products or plans
- +1353> to announce, please let me know.]
- +1355> - Buy Borland Pascal 7.0. It includes a 16 bit royalty-free DOS
- +1356> extender using the same interface as MS Windows. It functions
- +1357> under a DPMI server like Windows or QDPMI from Quarterdeck, and
- +1358> also provides its own server which you can distribute with your
- +1359> programs.
- +1361> 4. This option doesn't really count since it's not a solution in
-
- -1302> OS/2 2.0 or UNIX (or Win32/NT when it comes out). Borland is
- -1303> putting its OS/2 compiler into beta now. OS/2 is doing well (and it
- -1304> runs DOS or Windows programs). BC++ for OS/2 should also be a
- -1305> success and there should be a good upgrade path from current Borland
- -1306> compilers.
- +1363> OS/2 2.0 or UNIX (or NT when it comes out). I believe Win32 will
- +1364> allow you to write 32-bit Windows programs. [can someone fill me in
- +1365> on what exactly Win32 is?]
-
- -1605> In PD1:<MSDOS.PGMUTL> at Simtel you'll find RCS55.ZIP. I haven't
- +1664> In PD1:<MSDOS.PGMUTL> at Simtel you'll find RCS56DOS.ZIP. I haven't
-
- -1607> utility, but is limited to one-character extensions on filenames (no
- -1608> .CPP). A correspondent wrote that he has an RCS port to DOS that is
- -1609> not limited to one-character extensions, but he doesn't remember
- -1610> where he got it. Anyone have a verified archive site?
- +1666> utility, and is no longer limited to one-character extensions on
- +1667> filenames (so .CPP and .BAS are fine).
-
- (end of diffs for comp.os.msdos.programmer FAQ)
- --
- Stan Brown, Oak Road Systems brown@Ncoast.ORG
- Cleveland, Ohio, USA
- Xref: bloom-picayune.mit.edu comp.os.msdos.programmer:18888 news.answers:4711
- Path: bloom-picayune.mit.edu!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!mcsun!uknet!doc.ic.ac.uk!agate!ames!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ncoast!brown
- From: brown@NCoast.ORG (Stan Brown)
- Newsgroups: comp.os.msdos.programmer,news.answers
- Subject: comp.os.msdos.programmer FAQ part 1 of 4
- Message-ID: <msdos-faq.921220.1@NCoast.ORG>
- Date: 20 Dec 92 20:12:47 GMT
- Expires: Wed, 3 Feb 1993 20:12:47 GMT
- References: none
- Followup-To: comp.os.msdos.programmer
- Organization: Oak Road Systems, Cleveland Ohio USA
- Lines: 190
- Approved: news-answers-request@MIT.Edu
- Supersedes: <msdos-faq.921205.1@NCoast.ORG>
-
- Archive-name: msdos-programmer-faq/part1
- Last-modified: 20 December 1922
-
-
- This is the monthly FAQ list (Frequently Asked Questions list) for the
- newsgroup comp.os.msdos.programmer. Parts 2 through 4 of this article
- are posted as followups in the same thread. If the posting date shown
- above is more than six weeks in the past, see instructions in part 4 of
- this list for how to get an updated copy. (A separate article holds the
- changes from last month's edition. Look for the subject line
- "comp.os.msdos.programmer FAQ diffs".)
-